#ifndef _DEFINES_H_
#define _DEFINES_H_

#define MAX_STRING_LENGTH 256
#define MAX_PROXIES 10
#define MAX_STUN_SERVERS 10
#define MAX_AUDIO_CODECS 10
#include "pjsua.h"

// 定义结构体Account
typedef struct {
    char label[MAX_STRING_LENGTH];
    char server[MAX_STRING_LENGTH];
    char proxies[MAX_PROXIES][MAX_STRING_LENGTH];
    int num_proxies;
    char domain[MAX_STRING_LENGTH];
    char username[MAX_STRING_LENGTH];
    char authID[MAX_STRING_LENGTH];
    char password[MAX_STRING_LENGTH];
    char displayName[MAX_STRING_LENGTH];
    char transport[MAX_STRING_LENGTH];
    int registerRefresh;
    int keepAlive;
    int allowRewrite;
    int ice;
} Account;

// 定义结构体Settings
typedef struct {
    char userAgent[MAX_STRING_LENGTH];
    char audioInputDevice[MAX_STRING_LENGTH];
    char audioOutputDevice[MAX_STRING_LENGTH];
    int vad;
    int ec;
    int opusStereo;
    int forceCodec;
    char audioCodecs[MAX_AUDIO_CODECS][MAX_STRING_LENGTH];
    int num_audioCodecs;
    int disableVideo;
    int rport;
    int sourcePort;
    int rtpPortMin;
    int rtpPortMax;
    int enableSTUN;
    char STUN[MAX_STUN_SERVERS][MAX_STRING_LENGTH];
    int num_STUN;
    int enbaleDNS;
    char DNS[MAX_STUN_SERVERS][MAX_STRING_LENGTH];
    int num_DNS;
    int enableLog;
    char logPath[MAX_STRING_LENGTH];
} Settings;

typedef struct {
    pjsua_acc_id accountId;
    pjsua_transport_id transportId;
    Account account;
    Settings settings;
} CoreCtx;

#endif